package com.lisx.module_add_new_word.bean;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.ArrayList;
import java.util.List;

@Dao
public interface WordBeanDao {
    @Insert
    void insertWordBean(WordBean wordBean);

    @Delete
    void deleteWordBean(WordBean wordBean);

    @Update
    void updateWordBean(WordBean wordBean);

    @Query("SELECT * FROM word")
    List<WordBean> getWordList();

    @Query("SELECT * FROM word WHERE id = :id")
    WordBean getWordById(int id);
}
